﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using l1cs.server.model.Instance;
using l1cs.server.datatables;
using l1cs.server.model;
using l1cs.server.serverpackets;

namespace l1cs.server.clientpackets
{
    public class C_Buddy : ClientBasePacket
    {
        private const String _C_BUDDY = "[C] C_Buddy";
        private static Logger _log = Logger.getLogger( typeof( C_Buddy ).FullName );

        public C_Buddy( byte[] abyte0, ClientThread clientthread )
            : base( abyte0 )
        {
            L1PcInstance pc = clientthread.getActiveChar();
            L1Buddy buddy = BuddyTable.getInstance().getBuddyTable( pc.getId() );
            pc.sendPackets( new S_Buddy( pc.getId(), buddy ) );
        }

        override
        public String getType()
        {
            return _C_BUDDY;
        }
    }
}